// adapter/persistence/BookJpaRepository.java
package com.library.bookservice.adapter.persistence;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;

/**
 * 图书JPA仓库接口
 */
public interface BookJpaRepository extends JpaRepository<BookEntity, Long> {
    Optional<BookEntity> findByIsbn(String isbn);
    boolean existsByIsbn(String isbn);
    List<BookEntity> findByAuthor(String author);
    List<BookEntity> findByGenre(String genre);
}